<?php if (!defined('THINK_PATH')) exit(); if(is_array($tags)): foreach($tags as $key=>$t): ?><a  id="tag" href="<?php echo U('Index/tags',array('tid'=>$t['tid']));?>">
        <?php echo ($t['tname']); ?></a><?php endforeach; endif; ?>
<style>
    a#tag{
        width: 60px;
        height: 25px;
        background-color: #7DD5D5;
        color: white;
        display: inline-block;
        text-align: center;
        padding-top: 3px;
        float: left;
        border-radius:3px;
        margin-right: 10px;
    }
</style>